// src/router/index.ts
 
import { createRouter, createWebHistory } from 'vue-router';
 

// const routes: Array<RouteRecordRaw> = [
//   {
//     name: '',
//     path: '/',
//     meta: {  title: '首页' },
//     component: () => import('@/layout/index.vue'),
//     redirect: '/',
//     children: [
//       {
//         name: 'home',
//         path: '/home',
//         meta: { title: '首页' },
//         component: () => import('@/views/Home.vue')
//       },
//       {
//         name: 'G6-系列',
//         path: '/system/user',
//         meta: { title: 'G6-系列'},
//         component: () => import('@/views/G6Series/index.vue')
//       }
//     ]
//   },
//   {
//     name: '404',
//     path: '/404',
//     meta: {
//       title: '404页面'
//     },
//     component: () => import('@/views/404.vue')
//   }
// ]

const routes = [
  {
    path: '/',
    component: () => import('@/layout/index.vue'),
    children: [
      {
        path: '',
        component: () => import('@/views/Home.vue'),
        meta: { title: '首页' },
      },
      {
        path: 'G6',
        component: () => import('@/views/G6Series/index.vue'),
        meta: { title: 'G6-系列' },
      },
      {
        path: 'VirtualChat',
        component: () => import('@/views/VirtualChat/index.vue'),
        meta: { title: '虚拟聊天' },
      },
      {
        path: 'system',
        component: () => import('@/views/System/index.vue'),
        meta: { title: '系统管理' },
      },
    ],
  },
];
 
const router = createRouter({
  history: createWebHistory(),
  routes,
});

 
export default router;